package org.holynite.fieldmanage.managed.support

import org.holynite.fieldmanage.types.UsableTime

import javax.faces.bean.ApplicationScoped
import javax.faces.bean.ManagedBean

/**
 * Created by midnite on 15/1/31.
 */
@ManagedBean
@ApplicationScoped
class UsableTimeBean implements Serializable {
    List<UsableTime> times

    UsableTimeBean() {
        times = UsableTime.values()
    }

    UsableTime findByCodeSign(String code) {
        times.find { it.codeSign.equals(code) }
    }
}
